www.mxdraw.com
|
实现把多个控件的内容打印到一张图纸,实现嵌套打印
[helpstring("method BeginNestedPrint")] HRESULT BeginNestedPrint([out,retval] VARIANT_BOOL* pOk);
例如: VC COM
IMxDrawPrintPtr print; print.CreateInstance(__uuidof( MxDrawPrint )); // 开始打印. print->BeginNestedPrint(); print->Flag = 1; // 打印区位置(10,10,200,100),坐标系统是,X从左到右,Y从上到下. print->dLeftPageMargin = 10; print->dTopPageMargin = 10; print->dRightPageMargin = 200; print->dBottomPageMargin = 100; // 打印第一个控件。 m_ocx1.MakeCurrentOcx(); print->PrintScreen(); m_ocx2.MakeCurrentOcx(); // 打印区位置(10,110,200,210),坐标系统是,X从左到右,Y从上到下. print->dTopPageMargin = 110; print->dBottomPageMargin = 210; // 打印第二个控件。 print->PrintScreen(); print->EndNestedPrint();